package cn.yzfy.orm.mapper;


import cn.yzfy.common.model.UserRoleModel;
import cn.yzfy.common.model.dto.RolePageQueryDTO;
import cn.yzfy.common.model.entity.RoleEntity;
import cn.yzfy.common.model.vo.RolePageQueryListItemVO;
import cn.yzfy.common.model.vo.RoleVO;
import cn.yzfy.orm.config.BaseMapperExtension;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapperExtension<RoleEntity> {
    Page<RolePageQueryListItemVO> pageQueryList(@Param("page") Page page,
                                                @Param("param") RolePageQueryDTO inputDTO);

    /**
     * 获取展示层角色
     * @param userId
     * @return
     */
    List<RoleVO> queryUserRolesByUserId(@Param("userId") Long userId);

    List<UserRoleModel> queryUserRolesByUserIds(@Param("userIds") List<Long> userIds);


}